#include <iostream>
#include <vector>

using namespace std;

// back() 返回最后一个元素的引用

int main()
{
    vector<int> v1;
    v1.push_back(1);
    v1.push_back(2);

    cout << v1.back() << endl;

    v1.back() = 100;
    cout << v1.back() << endl;
}